https://leetcode-cn.com/problems/relative-ranks/submissions/
class Solution {
    public  String[] findRelativeRanks(int[] score) {
        int n = score.length;
        String[] str = new String[n];
        int[] array = score.clone();
        Arrays.sort(array);
        for (int i = 0; i < score.length; i++) {
            int rank = n - Arrays.binarySearch(array,score[i]);
            if(rank == 1){
                str[i] = "Gold Medal";
            }else if(rank == 2){
                str[i] = "Silver Medal";
            }else if(rank == 3){
                str[i] = "Bronze Medal";
            }else{
                str[i] = Integer.toString(rank);
            }
        }
        return str;
    }
}